/*
 * @Description: 字体图标
 * @Author: wangqi
 * @Date: 2022-04-30 11:17:01
 * @LastEditTime: 2022-04-30 11:44:07
 */

import { defineComponent } from 'vue';
import { createFromIconfontCN } from '@ant-design/icons-vue';

const MyIconFont = createFromIconfontCN({
  scriptUrl: '/iconfont.js',
});

export default defineComponent({
  name: 'IconFont',
  props: {
    type: {
      type: String,
      default: '',
    },
    color: {
      type: String,
      default: 'unset',
    },
    size: {
      type: [Number, String],
      default: 14,
    },
    scriptUrl: {
      type: String,
      default: '',
    },
  },

  setup(props) {
    return () => {
      const { type } = props;
      return <MyIconFont type={type} />;
    };
  },
});
